package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.dto.EmployeeDTO;
import com.sky.dto.EmployeePageQueryDTO;
import com.sky.entity.Employee;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface EmployeeMapper {
    @Select("select * from employee where username = #{username}")
    Employee getByUsername(String username);
    @AutoFill(OperationType.INSERT)
    void insert(Employee employee);
    List<Employee> getByPage(EmployeePageQueryDTO employeePageQueryDTO);
    void updateStatus(Integer status, Long id, LocalDateTime updateTime, Long updateUser);
    @AutoFill(OperationType.UPDATE)
    void update(Employee employee);
    Employee getById(Long id);
}
